﻿<?php
include("conn.php");
require_once("rep_spe_cha.php");
if(isset($_POST['keyword'])){


$str=search_check($_POST['keyword']);
$str=str_check($str);



//$str="  中国   福布斯 ";
$str=trim($str);
$key=explode(' ',$str);
$key=array_filter($key);
foreach($key as $id=>$v){
if($id==0){
$keyword=" keyword like '%$key[$id]%' ";

}else{
$keyword=$keyword." or keyword  like '%$key[$id]%' ";

}
} 

$sql="select * from hot_keyword  where  ".$keyword." order by count desc ";
$result=mysql_query($sql) or die(mysql_error());


 while($rows=mysql_fetch_array($result)){
echo "<div class='one_colnum' onmouseover='search(this)' onclick='tianchong(this)'>".$rows['keyword']."</div>";
echo "<br/>";
} 

}
?>